home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 4 / CU Amiga Magazine's Super CD-ROM 04 (1996)(EMAP Images)(GB)(Track 1 of 3)[!][issue 1996-11].iso / magazine / psion / utils / lp.lzx / lp.doc < prev    next >
Text File  |  2002-02-15  |  5KB  |  156 lines

  1. Lp -- version 1.1C
  2. ------------------
  3.  
  4. Lp is a print spooler for the Series 3, inspired by the Unix
  5. utility of the same name.
  6.  
  7. Lp presides over a directory \TMP on the S3, where various
  8. applications can leave plain text files. These file should have a
  9. .PRN extension; if so Lp will recognise them and the file names
  10. will be listed below the Lp icon.
  11.  
  12. At any time a user can choose to print one of the files by simply
  13. keying ENTER on the filename. Lp will then send the file to the
  14. printer device currently selected. On completion the program
  15. offers the option to delete the file printed.
  16.  
  17.  
  18. Installing Lp
  19. -------------
  20.  
  21. Copy the LP.APP file to the \APP directory of the Series 3
  22. internal drive. Create a new first-level subdirectory called \TMP
  23. on the internal drive. Use the Install application (Psion-I)
  24. option and pick LP.APP, whereupon the Lp icon will appear on the
  25. shell display.
  26.  
  27.  
  28. Using Lp
  29. --------
  30.  
  31. Lp uses the printer settings established by the user in the
  32. Printer Setup (Psion-P) dialog. When Lp is first started, it
  33. displays the standard print control dialog, so that margins, page
  34. length etc. may be customised by the user.
  35.  
  36. Any errors that arise during printing are communicated to the
  37. user by means of a standard notifier box. On completion of
  38. printing the user is prompted as to whether or not the file just
  39. printed should be deleted. The default (keying ENTER) is to
  40. delete the file; keying ESCAPE retains the file.
  41.  
  42. Lp can be terminated by quitting it from the shell, using the
  43. Delete key when the 'Lp' name is highlighted. When Lp is next
  44. started, it will present the print control dialog again.
  45.  
  46. For test purposes the file TEST.PRN can be used, once copied to
  47. the \TMP directory. TEST.PRN just exercises all the print
  48. controls recognised currently by Lp (see below).
  49.  
  50. It is possible to print any text file using Lp - not just those
  51. in a \TMP directory. To do so from the shell, position the
  52. highlight beneath the Lp icon and key TAB. Navigate to the
  53. desired file and key ENTER with the file name highlighted.
  54.  
  55. Print controls
  56. --------------
  57.  
  58. Lp recognises the following print controls embedded in source
  59. files. The print control lead-in character is a circumflex (^).
  60.  
  61. Code     Interpretation
  62.  
  63. ^0       Cancel all enhancements
  64. ^1       Bold on
  65. ^2       Bold off
  66. ^3       Italics on
  67. ^4       Italics off
  68. ^5       Underscore on
  69. ^6       Underscore off
  70. ^7       Toggle superscript
  71. ^8       Toggle subscript
  72. ^9       Start a new page for following text
  73.  
  74. Any other two-character sequence starting with ^ is ignored (not
  75. printed), except for '^^' which is printed as a single '^'.
  76.  
  77. Note that ^7 and ^8 controls are toggles, to be used in pairs,
  78. for example:
  79.  
  80.   Water, chemical name H^82^8O
  81.  
  82. Any attributes set at the end of printing one file are not
  83. carried over to the next to be printed. Each file printed starts
  84. with all print controls disabled.
  85.  
  86. The maximum line length in a file to be printed is 255
  87. characters.
  88.  
  89.  
  90. Note for OPL application developers
  91. -----------------------------------
  92.  
  93. Here is a typical section of code that creates a print file for
  94. use by Lp.
  95.  
  96.   #define TEMP_DIRECTORY "loc::m:\tmp\"
  97.  
  98.   REM Ensure temporary directory exists
  99.   trap mkdir TEMP_DIRECTORY
  100.  
  101.   REM Get a temporary file name
  102.   filenam$=prnname$:(TEMP_DIRECTORY,"Super")
  103.   trap lopen TEMP_DIRECTORY+filenam$
  104.   REM Out of space is the only likely error
  105.   if err :raise err :endif
  106.  
  107.   REM Output then close
  108.   lprint "^1Super-Duper Version 69^2"
  109.   REM etc.
  110.   lclose
  111.   REM Announce the file created
  112.   giprint "Created "+filenam$
  113.  
  114. Where the auxiliary prnname$ function is along the following
  115. lines:
  116.  
  117.   proc prnname$:(loc$,app$)
  118.   local s$(5), i%
  119.  
  120.   REM Make a filename prefix from first 5 letters
  121.   s$=left$(app$,5)
  122.   i%=1
  123.   while i%<999  REM Sanity check!
  124.     if not exist(loc$+s$+gen$(i%,5)+".prn")
  125.       break
  126.     endif
  127.     i%=i%+1
  128.   endwh
  129.   return s$+gen$(i%,5)+".prn"
  130.   endp
  131.  
  132. The ^n print controls can be defined as macros or placed in
  133. string variables, of course.
  134.  
  135.  
  136. Disclaimer of Warranty
  137. ----------------------
  138.  
  139. This document and the program referred to within it are supplied
  140. in the belief that the contents are correct and they operate as
  141. described, but Ferret Information Systems Ltd. (the company)
  142. shall not be liable in any circumstances whatsoever for any
  143. direct or indirect loss or damage suffered by any person as a
  144. consequence of any fault or defect in any goods or services
  145. supplied by the company and in no circumstances shall the company
  146. be liable for consequential damage or loss arising from the use
  147. or performance of such goods or services.
  148.  
  149.  
  150. --------------------------
  151. David Palmer
  152. Ferret Information Systems
  153. Edinburgh
  154. October 1992
  155.  
  156.